<div class="content-inner">
    <div class="marg20-btm">
        <a href=<?php echo site_url('backend_pages/addItem'); ?> class="btn btn-primary">&#43; Add Advertisings </a>
    </div>
    
</div>
<table class="table table-bordered table-striped">
    <thead>
        <tr>
            <th><input type="checkbox" class="check-all" value="" /></th>
            <th>ID</th>
            <th>Name </th>
            <th>Thumbs</th>
            <th>URL </th>
            <th>Date ( D-M-Y ) </th>
            
            <th>By </th>
            <th>Position </th>
            <th>Action </th>
        </tr>
    </thead>
    <tbody>
        <?php
        if ($adver->num_rows() > 0) {
            foreach ($adver->result() as $row) {
                $adverImg = array(
                    'src' => 'advertising/uploads/' . $row->media_img,
                    'alt' => $row->media_name,
                    'class' => 'post_images',
                    'width' => '35',
                    'height' => '30',
                    'title' => $row->media_name,
                    'rel' => 'lightbox',
                );

                echo '
								 <tr>
                                 <td><input type="checkbox" /></td>
                                 <td>' . $row->media_id . '</td> 	
                                 <td>' . $row->media_name . ' </td>
								 <td>
								 <a href="'.site_url().'/advertising/uploads/' . $row->media_img . '">
								 ' . img($adverImg) . '</a></td>
                                 <td>' . $row->media_url . ' </td>
                                 <td>' . $row->media_date . ' </td>
                                 <td>' . $this->session->userdata('name'). ' </td>
                                 <td>' . $row->pos_name . ' </td>
								
                                 
								 
                                 <td><a href=' . site_url('backend_pages/sel_upateItem') . '/' . $row->media_id . ' rel="tooltip" title="Edit" class="btn btn-primary"><i class="icon-edit"></i></a>
                                     <a href=' . site_url('backend_pages/delete_adver') . '/' . $row->media_img . ' rel="tooltip" title="Delete" class="btn btn-danger" onClick="return confirm(\'Are you sure to delete ?\')"><i class="icon-trash"></i></a>
                                 </td>';
            }
        }
        ?>

        </tr>
    </tbody>
</table>
<div class="form-inline">
    <select>
        <option />Bulk Actions 
        <option />Delete 
    </select>
    <input type="submit" value="Submit" class="btn btn-primary" onClick="return confirm('Are you sure ?');" />
</div>
<div class="pagination">
    <ul>

        <li><?php echo $pages; ?></li>

    </ul>
</div>